

from django.shortcuts import render
from django.db import connection
import requests
import json




# 连接 mysql 测试
def mysql_connect_test(request):
    mycursor = connection.cursor()
    mycursor.execute('   select * from `t_study_note` limit 0,2   ')
    result = mycursor.fetchall()
    print(result)
    my_data = {
        'title':'mysql test ...',
        'aaa': result
    }
    return render(request, 'mysql/inde.html', context=my_data)